package com.lonwin.inspectionmanagement.mvp.ui.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lonwin.inspectionmanagement.R;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.FilterBean;

import java.util.List;

/**
 * Author: zhangjing
 * DATA:2018/11/21 下午9:07
 * DESC:
 * email:zhangjingworkmol@163.com
 */
public class TextAdapter<T extends FilterBean> extends BaseQuickAdapter<T,BaseViewHolder>{
    public TextAdapter( @Nullable List<T> data) {
        super(R.layout.singletext, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, T item) {
        helper.getView(R.id.tvtext).setSelected(item.isSelected());
        helper.setText(R.id.tvtext,item.getTitle());
    }
}
